//
//  My_strcat.c
//  指针进阶三
//
//  Created by 马鹏朔 on 2022/10/24.
//

#include<stdio.h>
#include<string.h>
#include<assert.h>
char *  my_strcat(char* bast,const char* str)
{
    assert(bast&&str);
    char *ret =bast;
    while (*bast!='\0')
    {
        bast++;
    }
    while(*str!='\0')
    {
       * bast = *str;
        bast++;
        str++;
    }
    return ret;
    
}
int main()
{
    char arr1[]="hello world";
    char arr2[100]="hello world";
    my_strcat (arr2,arr1);
    printf("%s\n",arr2);
    return 0;
}
